Benjamin Otte [Mon, 17 Sep 2018 05:29:50 +0000 (07:29 +0200)]
listview: Introduce GtkListItemFactory
Thisis the abstraction I intend to use for creating widgets and binding
them to the item out of the listview.
For now this is a very dumb wrapper around the functions that exist in
the API.
But it leaves the freedom to turn this into public API, make an
interface out of it and most of all write different implementations, in
particular one that uses GtkBuilder.
Benjamin Otte [Sun, 16 Sep 2018 18:52:06 +0000 (20:52 +0200)]
gtk: Add a GtkListView skeleton
Benjamin Otte [Mon, 25 Nov 2019 07:15:31 +0000 (08:15 +0100)]
builder: Add <binding> tag
The tag contains an expression that it then gtk_expression_bind()s to
the object it is contained in.
Benjamin Otte [Mon, 25 Nov 2019 07:06:45 +0000 (08:06 +0100)]
builder: Allow text content in <lookup>
<lookup>foo</lookup>
is now short for
<lookup>
<constant>foo</constant>
</lookup>
ie it looks up the object with the given name so it can then do a
property lookup with it.
This is the most common operation, so it's a nice shortcut.
Benjamin Otte [Mon, 25 Nov 2019 07:04:24 +0000 (08:04 +0100)]
builder: Allow <constant> without a type
A constant without a type is assumed to be an object. This is the most
common case and allows
<constant>foo</constant>
without requiring updates to the type whenever the foo object changes.
Benjamin Otte [Mon, 25 Nov 2019 07:01:31 +0000 (08:01 +0100)]
builder: Make <lookup> type optional
If no type is set, use the type of the expression.
Benjamin Otte [Mon, 25 Nov 2019 06:28:19 +0000 (07:28 +0100)]
gtk-demo: Make fishbowl info text use bindings
It's a good demo for how bindings can format multiple properties into an
informative string with 1 line of code (and 5 lines of XML).
Matthias Clasen [Thu, 5 Dec 2019 00:18:50 +0000 (19:18 -0500)]
sorter: Add tests
Some basic tests for GtkSorter.
Benjamin Otte [Wed, 11 Dec 2019 00:22:20 +0000 (01:22 +0100)]
sortlistmodel: Make sort stable
The sort of the sortlistmodel is now stable with respect to the original
list model.
That means that if the sorter compares items as equal, the model
will make sure those items keep the order they were in in the original
model.
Or in other words: The model guarantees a total order based on the
item's position in the original model.
Benjamin Otte [Wed, 11 Dec 2019 00:11:59 +0000 (01:11 +0100)]
sortlistmodel: Redo the way we store the items
We need to keep this data around for changes in future commits where we
make the sorting stable.
An important part of the new data handling is that the unsorted list
needs to always be dealt with before the sorted list - upon creation we
rely on the unsorted iter and upon destruction, the sorted sequence
frees the entry leaving the unsorted sequence pointer invalid.
This change does not do any behavioral changes.
Matthias Clasen [Tue, 3 Dec 2019 04:44:22 +0000 (23:44 -0500)]
Redo sort list model with GtkSorter
Reshuffle the api to take full advantage
of GtkSorter. Update all callers.
Matthias Clasen [Sun, 8 Dec 2019 19:37:20 +0000 (14:37 -0500)]
Add GtkNumericSorter
This sorter compares numbers obtained from items
by evaluating an expression.
Matthias Clasen [Sun, 8 Dec 2019 18:54:57 +0000 (13:54 -0500)]
Add GtkMultiSorter
This is a sorter that tries multiple sorters in turn.
Matthias Clasen [Tue, 3 Dec 2019 04:43:14 +0000 (23:43 -0500)]
Add GtkStringSorter
This is a GtkSorter implementation collating strings
Matthias Clasen [Tue, 3 Dec 2019 04:43:14 +0000 (23:43 -0500)]
Add GtkCustomSorter
This is a GtkSorter implementation which uses a GCompareDataFunc.
Matthias Clasen [Tue, 3 Dec 2019 04:43:14 +0000 (23:43 -0500)]
Add GtkSorter
This is a helper object for sorting, similar to GtkFilter.
Benjamin Otte [Thu, 12 Dec 2019 04:16:31 +0000 (05:16 +0100)]
Add GtkOrdering
This is an enum that we're gonna use soon and it's worth introducing as a
separate commit.
The intention is to have meaningful names for return values in
comparison functions.
Matthias Clasen [Thu, 28 Nov 2019 19:40:34 +0000 (14:40 -0500)]
More expression tests
Test type mismatches, and the this pointer
during evaluation.
Benjamin Otte [Tue, 26 Nov 2019 02:57:40 +0000 (03:57 +0100)]
expression: Invalidate bindings before destroying them
Use a weak ref to invalidate bindings. Make sure that this happens
before creating any watches, so that notifies from the
watched expression about changes will not trigger set_property() calls
during dispose()/finalize().
Invalidating also ensures that the watches aren't removed, which can
trigger warnings if the watches are watching the object itself, and the
weak refs cannot be removed anymore.
Benjamin Otte [Sun, 24 Nov 2019 07:05:41 +0000 (08:05 +0100)]
expression: Add gtk_expression_bind()
Add a simple way to bind expressions to object properties. This is
essentially the thing to replace g_object_bind_property().
Benjamin Otte [Thu, 21 Nov 2019 05:02:56 +0000 (06:02 +0100)]
testsuite: Add expression tests
Benjamin Otte [Thu, 21 Nov 2019 04:53:56 +0000 (05:53 +0100)]
expression: Add the ability to watch an expression
Benjamin Otte [Mon, 18 Nov 2019 03:35:36 +0000 (04:35 +0100)]
builder: Add support for parsing expressions
Benjamin Otte [Wed, 11 Dec 2019 20:26:43 +0000 (21:26 +0100)]
filter: Add tests
Some basic tests for GtkFilter
Benjamin Otte [Wed, 11 Dec 2019 20:28:38 +0000 (21:28 +0100)]
Add GtkMultiFilter, GtkAnyFilter, GtkEveryFilter
GtkMultiFilter is the abstract base class for managing multiple child
filter.
GtkAnyFilter and GtkEveryFilter are the actual implementations.
Benjamin Otte [Sat, 16 Nov 2019 21:15:51 +0000 (22:15 +0100)]
filter: Add GtkStringFilter
Users provide a search filter and an expression that evaluates the items
to a string and then the filter goes and matches those strings to the
search term.
Benjamin Otte [Tue, 26 Nov 2019 17:59:34 +0000 (18:59 +0100)]
expression: Add GtkObjectExpression
Weak refs break cycles...
Benjamin Otte [Sat, 16 Nov 2019 20:52:18 +0000 (21:52 +0100)]
Add GtkExpression
GtkExpressions allow looking up values from objects.
There are a few simple expressions, but the main one is the closure
expression that just calls a user-provided closure.
Benjamin Otte [Sun, 10 Nov 2019 01:39:31 +0000 (02:39 +0100)]
filterlistmodel: Rewrite to use GtkFilter
Benjamin Otte [Sun, 10 Nov 2019 01:13:41 +0000 (02:13 +0100)]
tests: Remove testtreemodel test
testlistview does everything this test does.
Benjamin Otte [Sun, 10 Nov 2019 00:30:02 +0000 (01:30 +0100)]
Add GtkCustomFilter
Benjamin Otte [Sat, 9 Nov 2019 01:55:48 +0000 (02:55 +0100)]
Add GtkFilter
Benjamin Otte [Wed, 2 Oct 2019 03:38:11 +0000 (05:38 +0200)]
Add GtkDirectoryList
Adds a new listmodel called GtkDirectoryList that lists the children of
a GFile as GFileInfos.
This is supposed to be used by the filechooser.
Benjamin Otte [Sun, 24 May 2020 15:47:53 +0000 (17:47 +0200)]
eventcontrollermotion: Remove mode argument
It's not used and nobody has documented how it's meant to work anyway.
Matthias Clasen [Sat, 30 May 2020 16:29:12 +0000 (16:29 +0000)]
Merge branch 'fix-pango-deps' into 'master'
Fix inconsistencies in our pango deps
See merge request GNOME/gtk!1989
Matthias Clasen [Sat, 30 May 2020 15:51:21 +0000 (15:51 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Some listview preparations
See merge request GNOME/gtk!1988
Matthias Clasen [Sat, 30 May 2020 15:13:55 +0000 (11:13 -0400)]
Fix inconsistencies in our pango deps
We were applying the pango version requirements inconsistently,
leading to different pango variables being taking from system
pango vs the subproject at times. Thankfully, meson detects
this and complains, so we can fix it.
Matthias Clasen [Sat, 30 May 2020 15:12:05 +0000 (15:12 +0000)]
Merge branch 'fix-gesture-leak' into 'master'
gesture: Don't leak target widgets
Closes #2801
See merge request GNOME/gtk!1986
Benjamin Otte [Sat, 19 Oct 2019 03:15:15 +0000 (05:15 +0200)]
widget: Add gtk_widget_get_size()
A little bit of convenience.
Benjamin Otte [Wed, 6 Feb 2019 10:55:33 +0000 (11:55 +0100)]
wayland: Remove function declaration for nonexisting function
Benjamin Otte [Wed, 18 Dec 2019 15:47:31 +0000 (16:47 +0100)]
builder: Allow <property bind /> for objects
Previously, object properties had to always be set to a value.
This now works without it.
Matthias Clasen [Sat, 30 May 2020 14:45:47 +0000 (14:45 +0000)]
Merge branch 'pango-bump-v2' into 'master'
pango version bump v2
See merge request GNOME/gtk!1987
Matthias Clasen [Sat, 30 May 2020 14:41:52 +0000 (14:41 +0000)]
Merge branch 'wip/jimmac/backdrop-assasination' into 'master'
Adwaita: limit scope of :backdrop
Closes #2694
See merge request GNOME/gtk!1978
Matthias Clasen [Fri, 29 May 2020 14:52:38 +0000 (10:52 -0400)]
Bump the pango dependency
We soon want to rely on the list model apis in
pango 1.45. This commit also fixes a mixup where
using pango as a submodule would break the build
when pangoft2 is required.
Matthias Clasen [Sat, 30 May 2020 13:15:19 +0000 (09:15 -0400)]
gesture: Don't leak target widgets
This was broken when we started tracking event targets
in
dcbecdac31181854451e.
Fixes: #2801
Christoph Reiter [Sat, 30 May 2020 13:47:02 +0000 (15:47 +0200)]
CI: install a newer pango for MSYS2
Uses a build from git master from today
Matthias Clasen [Sat, 30 May 2020 13:41:42 +0000 (13:41 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
eventcontroller: Fix crossing event scopes
See merge request GNOME/gtk!1983
Matthias Clasen [Sat, 30 May 2020 12:55:21 +0000 (08:55 -0400)]
Revert "Bump the pango dependency"
This reverts commit
98df0be43dea6ff61aadb28e1823b11a6d53452a.
It broke the win32 build.
Matthias Clasen [Fri, 29 May 2020 23:39:15 +0000 (19:39 -0400)]
eventcontroller: Fix crossing event scopes
We want to deliver crossing events to controllers
with scope same-native as long as at least one of
the targets is on the same native. As a new approach,
treat out-of-scope targets like NULL, and deliver
crossing events as long as one of the targets is
not NULL.
Matthias Clasen [Fri, 29 May 2020 21:58:33 +0000 (17:58 -0400)]
Add GTK_DEBUG=shortcuts
If the shortcuts debug flag is set, print out
shortcut activations.
Matthias Clasen [Fri, 29 May 2020 19:40:34 +0000 (15:40 -0400)]
meson: Cosmetics
Treat the display backend list like other lists in the summary.
Matthias Clasen [Fri, 29 May 2020 14:52:38 +0000 (10:52 -0400)]
Bump the pango dependency
We soon want to rely on the list model apis in
pango 1.45. This commit also fixes a mixup where
using pango as a submodule would break the build
when pangoft2 is required.
Matthias Clasen [Fri, 29 May 2020 14:14:02 +0000 (14:14 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Bring back gdk_display_put_event
See merge request GNOME/gtk!1980
Matthias Clasen [Fri, 29 May 2020 13:25:17 +0000 (09:25 -0400)]
Bring back gdk_display_put_event
It is still needed in WebKit.
Jakub Steiner [Mon, 18 May 2020 20:51:02 +0000 (22:51 +0200)]
Adwaita: limit scope of :backdrop
- most controls don't have:backdrop state
- different :backdrop state reserved for windows, headebars and toolbars
and some buttons
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2694
Matthias Clasen [Fri, 29 May 2020 00:10:39 +0000 (00:10 +0000)]
Merge branch 'im-context-key-forward' into 'master'
Add back keyboard related apis
See merge request GNOME/gtk!1977
Matthias Clasen [Thu, 28 May 2020 21:11:54 +0000 (21:11 +0000)]
Merge branch 'display-api' into 'master'
gdk: Make event-related apis private
See merge request GNOME/gtk!1929
Matthias Clasen [Thu, 28 May 2020 20:10:54 +0000 (16:10 -0400)]
Add gtk_im_context_filter_key
An event-less variant of the filtering api.
Jordi Mas [Thu, 28 May 2020 19:43:02 +0000 (21:43 +0200)]
Update Catalan translation
Matthias Clasen [Thu, 28 May 2020 19:15:53 +0000 (15:15 -0400)]
Export keymap translation again
This is needed in WebKit webdriver test environment.
Matthias Clasen [Mon, 18 May 2020 13:02:13 +0000 (09:02 -0400)]
gdk: Make event-related apis private
Without a way to create events, there is no point
in allowing gdk_display_put_event to be used from
the outside. And little good can come out of using
the other apis, so just make them all private.
Alexander Larsson [Thu, 28 May 2020 16:22:53 +0000 (16:22 +0000)]
Merge branch 'frame-clock-alternative-approach-gtk4' into 'master'
Frame clock alternative approach for gtk4
See merge request GNOME/gtk!1932
Alexander Larsson [Thu, 28 May 2020 15:44:51 +0000 (17:44 +0200)]
frame-clock: Ensure we're always monotonic
A call to frame gdk_frame_clock_get_frame_time() outside of the paint
cycle could report an un-error-corrected frame time, and later a
corrected value could be earlier than the previously reported value.
We now always store the latest reported time so we can ensure
monotonicity.
Matthias Clasen [Thu, 28 May 2020 13:43:22 +0000 (13:43 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1976
Alexander Larsson [Thu, 28 May 2020 13:15:04 +0000 (15:15 +0200)]
tests: Disable idle locking in headless weston
In my local testing i was burned by the default 300sec value here.
I'm not sure if we actually hit this in the CI, but lets not
take any chances.
Alexander Larsson [Thu, 28 May 2020 13:10:38 +0000 (15:10 +0200)]
reftests: Fix frame inhibiting
Actually inhibit snapshotting of frames from reftest_inhibit_snapshot.
We were not ignoring the case where inhibit_count > 0, and then disconnected
the callback meaning we only ever got the first snapshot.
Alexander Larsson [Mon, 18 May 2020 13:48:03 +0000 (15:48 +0200)]
frame-clock: New approach in smoothing frame clock
In commit
c6901a8b, the frame clock reported time was changed from
simply reporting the time we ran the frame clock cycle to reporting a
smoothed value that increased by the frame interval each time it was
called.
However, this change caused some problems, such as:
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1415
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1416
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1482
I think a lot of this is caused by the fact that we just overwrote the
old frame time with the smoothed, monotonous timestamp, breaking
some things that relied on knowing the actual time something happened.
This is a new approach to doing the smoothing that is more explicit.
The "frame_time" we store is the actual time we ran the update cycle,
and then we separately compute and store the derived smoothed time and
its period, allowing us to easily return a smoothed time at any time
by rounding the time difference to an integer number of frames.
The initial frame_time can be somewhat arbitrary, as it depends on the
first cycle which is not driven by the frame clock. But follow-up
cycles are typically tied to the the compositor sending the drawn
signal. It may happen that the initial frame is exactly in the middle
between two frames where jitter causes us to randomly round in
different directions when rounding to nearest frame. To fix this we
additionally do a quadratic convergence towards the "real" time,
during presentation driven clock cycles (i.e. when the frame times are
small).
Alexander Larsson [Fri, 22 May 2020 13:30:05 +0000 (15:30 +0200)]
frame clock: Use compositor refresh rate info even if presentation time not set
On my X11 + nvidia setup gnome-shell doesn't report presentation times.
However it does report refresh rate. We were mostly using this in our
calculation except when computing predicted presentation time, were
it fell back on the default 60Hz.
Alexander Larsson [Tue, 19 May 2020 17:35:29 +0000 (19:35 +0200)]
frame clock: Used drawn_time (as well as presentation time) in profiler marks.
Alexander Larsson [Mon, 18 May 2020 14:56:33 +0000 (16:56 +0200)]
FrameClock debug: Log drawn_time if set
Matthias Clasen [Thu, 28 May 2020 12:52:55 +0000 (08:52 -0400)]
shortcut controller: Fix mnemonic cycling
Iterate the shortcuts we found in order, not in
reverse. Otherwise, we always end up activating
the last_selected one, since it is last in the
list.
This broke in
fb9b54d4b209afc when a list was
turned into an array.
Matthias Clasen [Thu, 28 May 2020 12:32:03 +0000 (08:32 -0400)]
widget-factory: Add a mnemonic conflict
Make Alt-e the mnemionic for both the Edit menu
and the Select button on page 2. This shows that
mnemonic cycling doesn't currently work, we always
open the menu.
Yuri Chornoivan [Thu, 28 May 2020 10:05:11 +0000 (10:05 +0000)]
Update Ukrainian translation
Emmanuele Bassi [Thu, 28 May 2020 09:11:43 +0000 (09:11 +0000)]
Merge branch 'fix_typos' into 'master'
Fix minor typos
See merge request GNOME/gtk!1974
Yuri Chornoivan [Thu, 28 May 2020 08:00:03 +0000 (11:00 +0300)]
Fix minor typos
Matthias Clasen [Thu, 28 May 2020 03:58:02 +0000 (03:58 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
a11y: Widgets have children
See merge request GNOME/gtk!1973
Matthias Clasen [Thu, 28 May 2020 02:56:33 +0000 (22:56 -0400)]
a11y: Widgets have children
This brings back some of what we lost when
GtkContainerAccessible went away.
Matthias Clasen [Thu, 28 May 2020 00:55:42 +0000 (00:55 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1972
Matthias Clasen [Thu, 28 May 2020 00:05:26 +0000 (20:05 -0400)]
aboutdialog: Stop overriding show()
This is entirely unnecessary.
Matthias Clasen [Thu, 7 May 2020 02:56:28 +0000 (22:56 -0400)]
volumebutton: Enable the tooltips
Little point in having a query-tooltip handler if
we don't make sure ::query-tooltip is emitted.
Matthias Clasen [Thu, 7 May 2020 02:52:20 +0000 (22:52 -0400)]
volumebutton: Remove broken a11y code
The accessible of a button is not an AtkImage,
so whatever this code was trying to do isn't
working. Remove it.
Matthias Clasen [Wed, 27 May 2020 23:00:18 +0000 (19:00 -0400)]
tooltips: Fix a line wrap mishap
We don't want wrapping labels to cause tooltips to
have excessive height, so we need to set a reasonable
value for width-chars, without forcing short tooltips
into a full line length. Also be careful to respect
preexisting line breaks (we have such examples in
widget factory).
Emmanuele Bassi [Wed, 27 May 2020 16:50:55 +0000 (16:50 +0000)]
Merge branch 'ebassi/overlay-docs' into 'master'
Ebassi/overlay docs
See merge request GNOME/gtk!1970
Matthias Clasen [Wed, 27 May 2020 16:36:18 +0000 (16:36 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Add to the docs README
See merge request GNOME/gtk!1971
Matthias Clasen [Wed, 27 May 2020 14:55:15 +0000 (10:55 -0400)]
Add to the docs README
Mention markdown syntax and gtk-doc additions.
Emmanuele Bassi [Wed, 27 May 2020 14:46:19 +0000 (15:46 +0100)]
Remove spurious annotations
Boolean values are not nullable, and have no ownership to transfer.
Emmanuele Bassi [Wed, 27 May 2020 14:45:38 +0000 (15:45 +0100)]
Add missing documentation for GtkOverlayLayout
We're missing the documentation for the constructor, and for the child
properties.
Emmanuele Bassi [Wed, 27 May 2020 14:10:40 +0000 (14:10 +0000)]
Merge branch 'ebassi/howto-docs' into 'master'
Ebassi/howto docs
See merge request GNOME/gtk!1969
Emmanuele Bassi [Wed, 27 May 2020 12:44:22 +0000 (13:44 +0100)]
docs: Link the documentation guidelines
From the coding style.
Emmanuele Bassi [Wed, 27 May 2020 12:26:39 +0000 (13:26 +0100)]
Add the beginnings of a docs contribution guide
We have one for the whole project, but the documentation should have a
proper introduction and a proper style guide.
Emmanuele Bassi [Tue, 26 May 2020 17:21:44 +0000 (18:21 +0100)]
Add myself to more sections
Emmanuele Bassi [Tue, 26 May 2020 17:20:21 +0000 (18:20 +0100)]
docs: Remove last two steps from the release howto
Drop the GTK list announcements, as we don't have lists any more.
The GTK website updates itself automatically, these days.
Emmanuele Bassi [Tue, 26 May 2020 17:19:53 +0000 (18:19 +0100)]
docs: Turn coding style into a markdown document
It was mostly one already, just needed some minor fixes.
Timm Bäder [Wed, 27 May 2020 10:06:53 +0000 (10:06 +0000)]
Merge branch 'carlosgc/fix-build' into 'master'
build: add gtkoverlaylayout.h to the list of public headers
See merge request GNOME/gtk!1968
Carlos Garcia Campos [Wed, 27 May 2020 09:05:12 +0000 (11:05 +0200)]
build: add gtkoverlaylayout.h to the list of public headers
GtkOverlayLayout is now public but the header is not installed.
Matthias Clasen [Wed, 27 May 2020 03:54:59 +0000 (03:54 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1967
Matthias Clasen [Wed, 27 May 2020 02:23:43 +0000 (22:23 -0400)]
win32: Drop an unsed variable
Matthias Clasen [Wed, 27 May 2020 00:52:41 +0000 (20:52 -0400)]
gdk: Drop no-longer-used documentation
Thread support is gone, and we don't have that
section in the docs anymore.
Matthias Clasen [Wed, 27 May 2020 00:35:13 +0000 (20:35 -0400)]
gdk: Remove an unused texture api
gdk_gl_texture_from_surface wasn't used anywhere,
so lets drop it.
Matthias Clasen [Wed, 27 May 2020 00:31:09 +0000 (20:31 -0400)]
gdk: Drop some unused event queue functions